import { Panel, LogRoller } from 'comps/common';

const MachineLog = ({ id, namespace, uuid }) => {
  let url = `/api/machines/${id}/log?namespace=${namespace}`;
  if (uuid) {
    url += `&uuid=${uuid}`;
  }
  return (
    <Panel>
      <LogRoller url={url} logKey={`machineLog#${id}-${namespace}`}/>
    </Panel>
  );
};

export default MachineLog;
